<template>
  <zl-select-user-input
    v-model="value"
    :get-url="getData"
    :is-avatar="true"
  />
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { ZlSelectUserInput } from '@zl-crud/components'
import '@zl-crud/components/select-user-input/style/index'

const value = ref('1,2')

// 模拟数据获取函数
const getData = (params) => {
  // 实际使用中这里应该是调用后端接口
  return new Promise((resolve) => {
    setTimeout(() => {
      resolve({
        data: [
          { label: '用户1', value: '1' },
          { label: '用户2', value: '2' }
        ]
      })
    }, 300)
  })
}
</script>